//
//  JSNavigationController.m
//  SECRET
//
//  Created by J.Cheng on 15-7-26.
//  Copyright (c) 2015年 Jessica. All rights reserved.
//

#import "JSNavigationController.h"

@implementation JSNavigationController





+(void)initialize
{
    if (self ==[JSNavigationController class])
    {
        
        UINavigationBar *bar =[UINavigationBar appearance];

        [bar setBarTintColor:kMainColor];
        NSDictionary *dic =@{NSFontAttributeName:[UIFont systemFontOfSize:20],NSForegroundColorAttributeName:[UIColor whiteColor]};
        [bar setTitleTextAttributes:dic];
        
        
        
//        [bar setTintColor:[UIColor redColor]];
//        [bar setBackgroundImage:[UIImage imageNamed:@"nav_normal"] forBarMetrics:UIBarMetricsDefault];
    }

}




- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    
    

 
    
    
    if (self.viewControllers.count > 0) {
        
        viewController.hidesBottomBarWhenPushed = YES;
        

        
        
        viewController.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithTarget:self action:@selector(back) image:@"navSuCai.bundle/icon_back" highImage:@"navSuCai.bundle/icon_back"];

        
        //系统侧拉代码
        
//        self.interactivePopGestureRecognizer.delegate = nil;

    }
    
    [super pushViewController:viewController animated:animated];

    
    
}




- (void)back
{
    [self popViewControllerAnimated:YES];
}


-(void)dealloc
{
    nslogF
}
@end
